package com.wc.alorithm_blue_bridge._思维.Q3904;

import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

/**
 * @Author congge
 * @Date 2023/11/22 10:55
 * @description
 * DNA序列修正
 * https://www.lanqiao.cn/problems/3904/learning/?page=1&first_category_id=1
 */
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.nextLine());
        char[] s1 = sc.nextLine().toCharArray();
        char[] s2 = sc.nextLine().toCharArray();
        Map<Character, Integer> map = new HashMap<>();
        map.put('A', 1);
        map.put('T', -1);
        map.put('C', 2);
        map.put('G', -2);
        int ans = 0;
        for (int i = 0; i < n; i++) {
            if (map.get(s1[i]) + map.get(s2[i]) != 0) {
                for (int j = i + 1; j < n; j++) {
                    /**
                     * 找到相互能交换的就交换，如果没找到，那么就直接修改就好了，不会影响
                     */
                    if (map.get(s1[i]) + map.get(s2[j]) == 0 && map.get(s1[j]) + map.get(s2[i]) == 0) {
                        char tmp = s1[i];
                        s1[i] = s1[j];
                        s1[j] = tmp;
                        break;
                    }
                }
                ++ans;
            }
        }
        System.out.println(ans);
    }
}
